﻿namespace ProgressTracker.Domain.Translation
{
    public interface ITaskForDayMapper
    {
        Domain.TaskForDay Create(Data.Entities.Task task, Data.Entities.Day day);
    }

    public class TaskForDayMapper : ITaskForDayMapper
    {
        public Domain.TaskForDay Create(Data.Entities.Task task, Data.Entities.Day day)
        {
            return new TaskForDay
            {
                Description = task.Description,
                Id = task.Id,
                IsComplete = task.IsCompleteForDay(day),
                Name = task.Name
            };
        }
    }
}
